package ac.il.technion.cs236635.project.core.policy;

import java.io.IOException;
import java.util.Properties;

import com.google.inject.AbstractModule;

public class SizeConfigurator extends AbstractModule {

	@Override
	protected void configure() {
		Properties properties = new Properties( );
		int size = 10;
		try {
			properties.load ( PolicyConfigurator.class.getClassLoader( ).getResourceAsStream( "server.properties"));
			size = Integer.valueOf( properties.getProperty( "queueSize"), 10);
		} catch (IOException e) {
			e.printStackTrace();
		}
		binder( ).bind( Integer.class).toInstance( size);
	}

}
